# 静默的猫和狗 　修改你在练习10-8中编写的except 代码块，让程序在任意文件不存在时静默失败。

def show_file_content(filename):
	"""打印读取的文件中的内容。"""
	try:
		with open(filename, encoding='utf-8') as f:
			lines = f.readlines()
	except FileNotFoundError:
		# print(f"Sorry, the file {filename} does not exist.")
		pass					# 静默失败(Error)
	else:
		for line in lines:
			print(line.rstrip())
	print("\n")
	
filenames = ['cats.txt', 'dogs.txt']
for filename in filenames:
	show_file_content(filename)

filenames = ['cats.txt', 'dogs1.txt']
for filename in filenames:
	show_file_content(filename)
